package org.example2;

import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;

/**
 * @Author: 滴滴滴
 * @CreateTime: 2024-11-02
 * @Description:
 * @Version: 1.0
 */

public class PockerGame {
    //牌盒
    //此时我们只需要把牌跟序号产生的对应关系就可以了，不需要进行排序
    static HashMap<Integer,String> hm = new HashMap<>();
    
    static ArrayList<Integer> list = new ArrayList<>();
    
    static {
        //准备牌
        String[] color = {"♣", "♦", "♥", "♠"};
        String[] number = {"2", "3", "4", "5", "6", "7", "8", "9", "10", "J", "Q", "K", "A"};

        int seriaNumber = 1;
        for (String n : number) {
            for (String c : color) {
                hm.put(seriaNumber,c+n);
                list.add(seriaNumber);
                seriaNumber++;
            }
        }
        hm.put(seriaNumber,"小王");
        list.add(seriaNumber);
        seriaNumber++;
        hm.put(seriaNumber,"大王");
        list.add(seriaNumber);
        System.out.println(list);
    }
    public PockerGame(){
        //洗牌
        Collections.shuffle(list);
        //发牌
        TreeLSet<Integer> load = new TreeLSet<>();
        TreeLSet<Integer> player1 = new TreeLSet<>();
        TreeLSet<Integer> player2 = new TreeLSet<>();
        TreeLSet<Integer> player3 = new TreeLSet<>();

        for (int i = 0; i < list.size(); i++) {

        }
    }

}
